package com.wyc.serviceorder.feign;

import com.wyc.internalCommon.request.DirectionDTO;
import com.wyc.internalCommon.request.PriceRuleDTO;
import com.wyc.internalCommon.result.ApiResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("service-price")
public interface ServicePriceFeignClient {

    /**
     * 查询计价规则是否是最新版本
     * @param priceRuleDTO
     * @return
     */
    @PostMapping("/price/isNew")
    ApiResult isNew(@RequestBody PriceRuleDTO priceRuleDTO);

    /**
     * 计算实际价格
     * @param directionDTO
     * @return
     */
    @PostMapping("/calulate-price")
    ApiResult calulatePrice(@RequestBody DirectionDTO directionDTO);

}
